package com.jxc.model.po;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/***********************************************************************
 * Module:  OperationLog.java
 * Author:  Tino
 * Purpose: Defines the Class OperationLog
 ***********************************************************************/

/**
 * 操作日志
 * 
 * @pdOid b70c001c-dab2-458a-969d-482e73ef2531
 */
@Entity
@Table(name = "XTPZ_OPERATION_LOG")
public class OperationLog extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -4459519385649119540L;
	/**
	 * 操作用户
	 * 
	 * @pdOid 204ddd33-02b3-4d58-9dc9-53f63ccc8997
	 */
	private User user;
	/**
	 * 操作时间
	 * 
	 */
	private Date optTime;
	/**
	 * 操作IP
	 * 
	 */
	private String optIp;
	/**
	 * action类名
	 * 
	 */
	private String actionName;
	/**
	 * action方法名
	 * 
	 */
	private String method;
	/**
	 * 耗时（毫秒）
	 * 
	 */
	private Long costTime;

	/**
	 * 操作信息
	 * 
	 * @pdOid de1736cd-4139-42f1-8ced-fca651c102e2
	 */
	private String info;
	/**
	 * 参数
	 */
	private String params;

	@Column(name = "OPT_TIME")
	public Date getOptTime() {
		return optTime;
	}

	public void setOptTime(Date optTime) {
		this.optTime = optTime;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "OPT_IP")
	public String getOptIp() {
		return optIp;
	}

	public void setOptIp(String optIp) {
		this.optIp = optIp;
	}

	@Column(name = "ACTION_NAME")
	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	@Column(name = "METHOD")
	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	@Column(name = "COST_TIME")
	public Long getCostTime() {
		return costTime;
	}

	public void setCostTime(Long costTime) {
		this.costTime = costTime;
	}

	@Column(name = "INFO")
	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}
	@Column(name = "PARAMS")
	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

}